import { legacy_createStore, combineReducers, compose, applyMiddleware } from 'redux'
import thunk from 'redux-thunk';
import NumStatus from './NumStatus/reducer'

//合并多个模块的reducer
const reducers = combineReducers({
  NumStatus
})

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;
const enhancer = composeEnhancers(
  applyMiddleware(thunk)
);

const store = legacy_createStore(reducers, enhancer)

export default store